//定义函数GetQueryString
function GetQueryString(name) {
  //定义对象reg 新的正则表达式
  var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  //
  var r = window.location.search.substr(1).match(reg);
  if (r != null) {
    var str = r[2];
    return decodeURIComponent(str);
  }
  return null;
}

function queryROLE(){
  var ROLEID = window.JSON.parse(localStorage.ROLE).id;
  return ROLEID;
}

function queryPartnerId(){
  var partnerId = window.JSON.parse(localStorage.ROLE).PARTNER_ID;
  return partnerId;
}

function queryPartnerName(){
  var partnerName = window.JSON.parse(localStorage.ROLE).PARTNER_NAME;
  return partnerName;
}

function queryTeamId(){
  var teamId = window.JSON.parse(localStorage.operation).teamId;

  return teamId;
}

//将对象方法裸露出来
module.exports = {
  GetQueryString,
  queryROLE,
  queryPartnerId,
  queryPartnerName,
  queryTeamId
}
